<div class="content-box"><!-- Start Content Box -->
    <div class="content-box-header">

        <h3>Sửa footer</h3>

        <ul class="content-box-tabs">

            <li><a href="index.php?page=lienket">Table</a></li> <!-- href must be unique and match the id of target div -->
            <li><a href="#tab2" class="default-tab">Forms</a></li>
        </ul>

        <div class="clear"></div>

    </div> <!-- End .content-box-header -->

    <div class="content-box-content">



        <div class="content-box-tabs" id="tab2">
    <div class="bot"></div>
    <div class="contentt">
        
		<?php
        $hide_show=1;
        $txt_noidung='';
		if(isset($_POST['txt_noidung']))	{$txt_noidung=$_POST['txt_noidung'];$hide_show=0;}
		
       

        if($hide_show==1)
        {
		$sqli='	SELECT 		*
							FROM 	tbl_footer
							
							WHERE tbl_footer.id='.$id.'';
		$result=mysql_query($sqli);
				// Lay du lieu day vao form
		$num=mysql_num_rows($result);
		
		if($num==1)
		{
			$row=mysql_fetch_array($result);
            $txt_noidung = $row['noidung'];
        }
        ?>
        <form action="" method="post" enctype="multipart/form-data">
            <fieldset>

                        <p>
                        <label>Nội dung</label>
                        <textarea name="txt_noidung" class="text-input textarea ckeditor" rows="10" cols="10" ><?php echo $txt_noidung;?></textarea>
                    </p>

                    <p style="padding-top:50px">
                        <input class="btn" type="submit" value="Cập nhật" name="submit2" style=" width:200px"/>
                    </p>

            </fieldset>
        </form>
    <?php
	}else
	{
	    $sql3_1="UPDATE 	tbl_footer
						SET 	
								noidung='".$txt_noidung."'
								
						WHERE id='".$id."'
						";

		$res=mysql_query($sql3_1);
		header('refresh:1; index.php?page=footer');
		
		
	}
	?>

</div>
</div>
</div>
</div>
